package com.young4j.springdemo.config.event;

import org.springframework.context.ApplicationEvent;

/**
 * @Description 定义事件
 * @Author yf
 * @Date 2018/12/26 16:53
 **/
public class BlackEvent extends ApplicationEvent {
    String address;

    /**
     * 父类中有非父类构造函数,子类构造函数必须调用父类构造函数，所以必须声明一个构造函数
     * @param source
     * @param address
     */
    public BlackEvent(Object source,String address) {
        super(source);
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
